package com.cangshi.dao;

import com.cangshi.entity.Group;
import com.cangshi.entity.GroupUserKey;
import com.cangshi.entity.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface GroupUserMapper {
    int deleteByPrimaryKey(GroupUserKey key);

    int insert(GroupUserKey record);

    int insertSelective(GroupUserKey record);

    List<GroupUserKey> selectBySelectiveKey(GroupUserKey record);

    Integer selectCountBySelectiveKey(GroupUserKey record);

    List<User> selectUsersByGroupId(Integer userId);

    List<Group> selectGroupsChecking(@Param("userId") Integer userId ,@Param("group") Group group, @Param("line") Integer line, @Param("next") Integer next);

    List<Group> selectAllGroupsByUserId(@Param("userId") Integer userId ,@Param("group") Group group, @Param("line") Integer line, @Param("next") Integer next);

}